package com.zbkj.crmeb.member.enums;

import com.zbkj.crmeb.enums.BannerTypeEnum;

/**
 * @Model -
 * @Create by 2022/5/10 15:08
 * @Author xxxx
 * @Explain <p>_</p>
 */
public enum EquityTypeEnum {

    //权益类型，1优惠券，2折扣，3积分
    COUPON(1,"优惠券"),
    DISCOUNT(2,"折扣"),
    INTEGRAL(3,"积分");

    Integer code;
    String value;

    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    private EquityTypeEnum(Integer code, String value){
        this.code = code;
        this.value = value;
    }
    public static EquityTypeEnum getValueByCode(Integer code){
        if(code != null){
            for(EquityTypeEnum val : EquityTypeEnum.values()){
                if(val.code.equals(code)){
                    return val;
                }
            }
        }
        return null;
    }
}
